#pragma GCC optimize(2)
#include <iostream>
#include <algorithm>
#include <cstring>
#include <string>
#include <map>
#include <vector>

using namespace std;
using LL = long long;
const int N = 2e5 + 10;
vector<int> num;
vector<int> q;
int res[N];

int findR(int x){
    int l = 0, r = q.size() - 1;
    while(l < r){
        int mid = l + r + 1 >> 1;
        if(q[mid] > x){
            r = mid - 1;
        }else{
            l = mid;
        }
    }
    return l;
}

int findL(int x){
    int l = 0, r = q.size() - 1;
    while(l < r){
        int mid = l + r >> 1;
        if(q[mid] < x){
            l = mid + 1;
        }else{
            r = mid;
        }
    }
    return l;
}

int main(){
    freopen("in.txt", "r", stdin);
    freopen("out.txt", "w", stdout);
    ios::sync_with_stdio(false);
    cin.tie(nullptr);

    

    int n;
    cin >> n;
    for(int i = 0, x; i < n; i ++){
        cin >> x;
        q.push_back(x);
        num.push_back(x);
    }

    sort(q.begin(), q.end());
    sort(num.begin(), num.end());
    num.erase(unique(num.begin(), num.end()), num.end());

    int sz = num.size() - 1;
    for(int i = sz, j = 0; i >= 0; i --, j ++){
        res[j] = num[i];
    }

    for(int i = 0; i < n; i ++){
        if(res[i] == 0){
            cout << 0 << '\n';
        }else{
            int l = findL(res[i]), r = findR(res[i]);
            cout << r - l + 1 << '\n';
        }
    }


    


    return 0;
}